{include file='header.html'}
<ul class="nav nav-tabs">
	    	<li class="item"><a href="{$appadmin}?m=news">新鲜事</a></li>
	    	<li class="item active"><a href="{$appadmin}?m=news_comment">评论</a></li>
	    	<li class="item"><a href="{$appadmin}?m=news_blacklist">黑名单</a></li>
	    </ul>

<div class="rbox">
<table width="100%" border="0" class="table table-bordered">
  <tr>
    <th width="6%" height="24" align="center">ID</th>
    <th width="8%" align="center">{$lang.nickname}</th>
 
    <th width="10%" align="center">{$lang.time}</th>
     
    <th width="47%" align="center">{$lang.content}</th>
    
    <th width="18%" align="center">{$lang.operation}</th>
  </tr>
  {foreach item=c from=$data}
  <tr>
    <td align="center">{$c.id}</td>
    <td align="center">{$c.nickname}</td>
   
    <td align="center">{$c.dateline|date:Y-m-d}</td>
    
    <td align="left">{$c.content}</td>
    <td align="center"> 
    
    <a href="javascript:;" class="del" url="{$appadmin}?m=news_comment&a=delete&ajax=1&id={$c.id}">{$lang.delete}</a>
    <a href="javascript:;" class="js-newsuser-forbid" v-userid="{$c.userid}">禁言</a>
    </td>
  </tr>
  {/foreach}
  
</table>
{$pagelist}

</div>
<script language="javascript">
$(document).ready(function(){
	$(".changestatus").click(function(){
		obj=$(this);
		$.getJSON($(this).attr("url"),function(data){
			if(data.error=='0'){
				obj.parents("tr").children(".status_text").html(obj.attr("text"));
			}else{
				alert(data.message);
			}
		})
		
	});
	
	$(".js-newsuser-forbid").click(function(){
   				var obj=$(this);
   				$.get("{$appadmin}?m=news_blacklist&a=forbid&userid="+$(this).attr("v-userid"),function(data){
   					obj.html("已禁言");
   				});
   			})
	
});
</script>

{include file='footer.html'}